import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import './assets/global.css'
import header from './components/header/index'
import TypeNav from './pages/home/TypeNav/index'
import Header from './components/header/index'
import store from './store/index'
import 'swiper/css/swiper.css'//引入css样式
import Carousel from './components/Carousel/index'
import Pagination from './components/Pagination/index';
import './assets/font_3099996_l8xbufby21j/iconfont.css'
import './plugins/element'
import VueLazyload from "vue-lazyload";
import './plugins/validate'
Vue.component(header.name,Header)
Vue.component(TypeNav.name,TypeNav)//注册全局组件
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)
import './mock/mockServe'//引入mockServe中轮播使用的数据
import *as API from './api/index'//统一接口api文件里面全部请求函数(统一引入)
console.log(API)
Vue.config.productionTip = false
//下面是图片的懒加载
Vue.use(VueLazyload,{

})
new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus=this//全局事件总线配置,用于兄弟组件的通信
    Vue.prototype.$API=API
  }
}).$mount('#app')
